home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group03a.txt
/
000019_icon-group-sender_Thu Feb 20 13:31:58 2003.msg
< prev
next >
Wrap
Internet Message Format
|
2003-12-22
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1KKSwc05373
for icon-group-addresses; Thu, 20 Feb 2003 13:28:58 -0700 (MST)
Message-Id: <200302202028.h1KKSwc05373@baskerville.CS.Arizona.EDU>
From: Patrick Scheible <kkt@itchy.serv.net>
X-Newsgroups: comp.lang.icon
Subject: Re: Simplifying Integer Arithmetic
Date: 20 Feb 2003 17:28:32 GMT
X-Newsreader: Gnus v5.3/Emacs 19.34
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
"Frank J. Lhota" <NOSPAM.lhota.adarose@verizon.net> writes:
> The question I pose to this group is whether we should assume that any C
> compiler used for Icon uses the "round towards 0" method for evaluating a /
> b and a % b for integers a and b. Given this assumption, we could simplify
> the div3 and mod3 functions in "runtime/rmisc.r" as follows:
I would suggest not making any assumptions about which C compilers
people may use at some point, especially since the work of making Icon
round towards 0 regardless of the C compiler's behavior has already
been done. Who knows what strange platforms someone may wish to port
Icon to at some point?
However, I have not done a survey of whether there are any C compilers
that do not round towards 0. (Maybe the nice people in comp.lang.c
happen to know?)
-- Patrick